don't queue the widget for resize or emit change notification if the usize
author4 <timj@birnet.org>
Tue, 12 Oct 2004 15:12:44 +0000 (15:12 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 12 Oct 2004 15:12:44 +0000 (15:12 +0000)
Tue Oct 12 17:11:02 2004    <timj@birnet.org>

        * gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
        widget for resize or emit change notification if the usize didn't
        change. this works around a buggy signal connection in #155139.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkwidget.c

index db255a468ce73a02c97ce7b9c3a61a612fa00d2d..6bb4321cee155c9dc58d0daf2b1ca90188aec48b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Oct 12 17:11:02 2004    <timj@birnet.org>
+
+       * gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
+       widget for resize or emit change notification if the usize didn't
+       change. this works around a buggy signal connection in #155139.
+
 2004-10-11  Matthias Clasen  <matthias@localhost.localdomain>
 
        * docs/tools/widgets.c: Create scrolledwindow, statusbar, 
index db255a468ce73a02c97ce7b9c3a61a612fa00d2d..6bb4321cee155c9dc58d0daf2b1ca90188aec48b 100644 (file)
@@ -1,3 +1,9 @@
+Tue Oct 12 17:11:02 2004    <timj@birnet.org>
+
+       * gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
+       widget for resize or emit change notification if the usize didn't
+       change. this works around a buggy signal connection in #155139.
+
 2004-10-11  Matthias Clasen  <matthias@localhost.localdomain>
 
        * docs/tools/widgets.c: Create scrolledwindow, statusbar, 
index db255a468ce73a02c97ce7b9c3a61a612fa00d2d..6bb4321cee155c9dc58d0daf2b1ca90188aec48b 100644 (file)
@@ -1,3 +1,9 @@
+Tue Oct 12 17:11:02 2004    <timj@birnet.org>
+
+       * gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
+       widget for resize or emit change notification if the usize didn't
+       change. this works around a buggy signal connection in #155139.
+
 2004-10-11  Matthias Clasen  <matthias@localhost.localdomain>
 
        * docs/tools/widgets.c: Create scrolledwindow, statusbar, 
index db255a468ce73a02c97ce7b9c3a61a612fa00d2d..6bb4321cee155c9dc58d0daf2b1ca90188aec48b 100644 (file)
@@ -1,3 +1,9 @@
+Tue Oct 12 17:11:02 2004    <timj@birnet.org>
+
+       * gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
+       widget for resize or emit change notification if the usize didn't
+       change. this works around a buggy signal connection in #155139.
+
 2004-10-11  Matthias Clasen  <matthias@localhost.localdomain>
 
        * docs/tools/widgets.c: Create scrolledwindow, statusbar, 
index f9534899de415634ea9d69998a29eb24e5f73088..eefa3ee9c27f097dc098c8e63d5426b81b48a0b8 100644 (file)
@@ -5509,25 +5509,28 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
                               gint       height)
 {
   GtkWidgetAuxInfo *aux_info;
+  gboolean changed = FALSE;
   
   g_return_if_fail (GTK_IS_WIDGET (widget));
   
   g_object_freeze_notify (G_OBJECT (widget));
 
-  aux_info =_gtk_widget_get_aux_info (widget, TRUE);
+  aux_info = _gtk_widget_get_aux_info (widget, TRUE);
   
-  if (width > -2)
+  if (width > -2 && aux_info->width != width)
     {
       g_object_notify (G_OBJECT (widget), "width_request");
       aux_info->width = width;
+      changed = TRUE;
     }
-  if (height > -2)
+  if (height > -2 && aux_info->height != height)
     {
       g_object_notify (G_OBJECT (widget), "height_request");  
       aux_info->height = height;
+      changed = TRUE;
     }
   
-  if (GTK_WIDGET_VISIBLE (widget))
+  if (GTK_WIDGET_VISIBLE (widget) && changed)
     gtk_widget_queue_resize (widget);
 
   g_object_thaw_notify (G_OBJECT (widget));